Optimal. Leaf size=42 \[ -\frac {\sqrt {2} \tan ^{-1}\left (\frac {\sqrt {a} \cos (x)}{\sqrt {2} \sqrt {\sin (x)} \sqrt {a+a \sin (x)}}\right )}{\sqrt {a}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2861, 211}
\begin {gather*} -\frac {\sqrt {2} \text {ArcTan}\left (\frac {\sqrt {a} \cos (x)}{\sqrt {2} \sqrt {\sin (x)} \sqrt {a \sin (x)+a}}\right )}{\sqrt {a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 2861
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {\sin (x)} \sqrt {a+a \sin (x)}} \, dx &=-\left ((2 a) \text {Subst}\left (\int \frac {1}{2 a^2+a x^2} \, dx,x,\frac {a \cos (x)}{\sqrt {\sin (x)} \sqrt {a+a \sin (x)}}\right )\right )\\ &=-\frac {\sqrt {2} \tan ^{-1}\left (\frac {\sqrt {a} \cos (x)}{\sqrt {2} \sqrt {\sin (x)} \sqrt {a+a \sin (x)}}\right )}{\sqrt {a}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 0.06, size = 125, normalized size = 2.98 \begin {gather*} \frac {2 \left (F\left (\left .\sin ^{-1}\left (\frac {1}{\sqrt {\tan \left (\frac {x}{4}\right )}}\right )\right |-1\right )-\Pi \left (1-\sqrt {2};\left .\sin ^{-1}\left (\frac {1}{\sqrt {\tan \left (\frac {x}{4}\right )}}\right )\right |-1\right )-\Pi \left (1+\sqrt {2};\left .\sin ^{-1}\left (\frac {1}{\sqrt {\tan \left (\frac {x}{4}\right )}}\right )\right |-1\right )\right ) \sec ^2\left (\frac {x}{4}\right ) \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right ) \sqrt {\sin (x)}}{\sqrt {1-\cot ^2\left (\frac {x}{4}\right )} \sqrt {a (1+\sin (x))} \tan ^{\frac {3}{2}}\left (\frac {x}{4}\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.34, size = 54, normalized size = 1.29
method | result | size |
default | \(\frac {2 \sqrt {-\frac {-1+\cos \left (x \right )}{\sin \left (x \right )}}\, \left (-1+\cos \left (x \right )-\sin \left (x \right )\right ) \left (\sqrt {\sin }\left (x \right )\right ) \arctan \left (\sqrt {-\frac {-1+\cos \left (x \right )}{\sin \left (x \right )}}\right )}{\sqrt {a \left (1+\sin \left (x \right )\right )}\, \left (-1+\cos \left (x \right )\right )}\) | \(54\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 163, normalized size = 3.88 \begin {gather*} \left [\frac {1}{4} \, \sqrt {2} \sqrt {-\frac {1}{a}} \log \left (\frac {17 \, \cos \left (x\right )^{3} - 4 \, \sqrt {2} {\left (3 \, \cos \left (x\right )^{2} + {\left (3 \, \cos \left (x\right ) + 4\right )} \sin \left (x\right ) - \cos \left (x\right ) - 4\right )} \sqrt {a \sin \left (x\right ) + a} \sqrt {-\frac {1}{a}} \sqrt {\sin \left (x\right )} + 3 \, \cos \left (x\right )^{2} + {\left (17 \, \cos \left (x\right )^{2} + 14 \, \cos \left (x\right ) - 4\right )} \sin \left (x\right ) - 18 \, \cos \left (x\right ) - 4}{\cos \left (x\right )^{3} + 3 \, \cos \left (x\right )^{2} + {\left (\cos \left (x\right )^{2} - 2 \, \cos \left (x\right ) - 4\right )} \sin \left (x\right ) - 2 \, \cos \left (x\right ) - 4}\right ), \frac {\sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {a \sin \left (x\right ) + a} {\left (3 \, \sin \left (x\right ) - 1\right )}}{4 \, \sqrt {a} \cos \left (x\right ) \sqrt {\sin \left (x\right )}}\right )}{2 \, \sqrt {a}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {a \left (\sin {\left (x \right )} + 1\right )} \sqrt {\sin {\left (x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {1}{\sqrt {\sin \left (x\right )}\,\sqrt {a+a\,\sin \left (x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________